﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace AnesSystem.Converters
{
    public class ShowWayValue2IsCheckedConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null) return value;
            string flag = value.ToString();
            if (string.IsNullOrEmpty(flag))
            {
                return "表格显示";
            }
            else if (flag.Equals("0"))
            {
                return "折线显示";
            }
            else 
            {
                return "表格显示";
            }
           
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value;
        }
    }
}
